package com.foreknow.demo9Exercise2;

import java.util.Scanner;

public class E {

    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);

        System.out.println("请输入一个正整数(大于1):");
        int n = input.nextInt();
        A a = new ClassA();
        int sum = a.method(n);
        System.out.println("结果为：" + sum);

        System.out.println("请输入一个正整数(大于1):");
        int j = input.nextInt();
        ClassB b = new ClassB();
        int jieceng = b.method(j);
        System.out.println("结果为：" + jieceng);
    }

}
